<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>


<script type="text/javascript">
	function checkData(){
		var q=document.getElementById("q").value.trim();
		if(q==null || q==""){
			alert("请输入您要查询的关键字！");
			return false;
		}else{
			return true;
		}
	}
</script>

<div class="row">
	<div class="col-md-12" style="padding-top: 0px">
		<nav class="navbar navbar-default">
		  <div class="container-fluid">
		    <div class="navbar-header">
		      <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
		        <span class="sr-only">Toggle navigation</span>
		        <span class="icon-bar"></span>
		        <span class="icon-bar"></span>
		        <span class="icon-bar"></span>
		      </button>
		      <a class="navbar-brand" href="${pageContext.request.contextPath}/index.html"><font color="black"><strong>🚩&nbsp;技术家园</strong></font></a>
		    </div>

		    <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1" >

		      <ul class="nav navbar-nav">
		        <li><a href="${pageContext.request.contextPath}/blogger/aboutMe/${currentUser.id}.html" target="_blank"><font color="black"><strong>😎&nbsp;高手简介</strong></font></a></li>
		        <li><a href="${pageContext.request.contextPath}/login.jsp" target="_blank"><font color="black"><strong>💒&nbsp;家园管理</strong></font></a></li>
				<li><a href="${pageContext.request.contextPath}/register.jsp" target="_blank"><font color="black"><strong>👏&nbsp;欢迎加入</strong></font></a></li>
				<li><a href="${pageContext.request.contextPath}/admin/writeBlog.jsp" target="_blank"><font color="black"><strong>🖋&nbsp;我要创作</strong></font></a></li>
		      </ul>

		      <form action="${pageContext.request.contextPath}/blog/q.html" class="navbar-form navbar-right" role="search" method="post" onsubmit="return checkData()">
		        <div class="form-group" >
		          <input type="text" id="q" name="q" value="${q }" class="form-control" placeholder="请输入要查询的关键字...">
		        </div>
		        <button type="submit" class="btn btn-default">🏸&nbsp;搜索</button>
		      </form>

		    </div>
		  </div>
		</nav>
	</div>
</div>